Magnetic sensor and method of producing the same

ABSTRACT

On a single chip are formed a plurality of magnetoresistance effect elements provided with pinned layers having fixed magnetization axes in the directions that cross each other. On a substrate  10  are formed magnetic layers that will become two magnetic tunnel effect elements  11, 21  as magnetoresistance effect elements. Magnetic-field-applying magnetic layers made of NiCo are formed to sandwich the magnetic layers in plan view. A magnetic field is applied to the magnetic-field-applying magnetic layers. The magnetic field is removed after the magnetic-field-applying magnetic layers are magnetized in the direction shown by arrow A. As a result of this, by the residual magnetization of the magnetic-field-applying magnetic layers, magnetic fields in the directions shown by arrows B are applied to the magnetic layers that will become magnetic tunnel effect elements  11, 21,  whereby the magnetization of the pinned layers of the magnetic layers that will become magnetic tunnel effect elements  11, 21  is pinned in the directions shown by arrows B.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a magnetic sensor using amagnetoresistance effect (magnetoresistive effect) element containing apinned layer and a free layer, and more particularly to a magneticsensor having two or more magnetoresistance effect elements formed on asingle chip where the magnetization directions of the pinned layers ofthe magnetoresistance effect elements cross each other, as well as amethod of producing the same.

2. Description of the Background Art

Hitherto, as an element usable in a magnetic sensor, there are known agiant magnetoresistance element (GMR element), a magnetic tunnel effectelement (TMR element, tunneling GMR), and others. Thesemagnetoresistance effect elements are provided with a pinned layer whosemagnetization direction is pinned (fixed) in a predetermined directionand a free layer whose magnetization direction changes in accordancewith an external magnetic field, thereby exhibiting a resistance valuethat accords with the relative relationship between the magnetizationdirection of the pinned layer and the magnetization direction of thefree layer.

However, it is difficult to form two or more magnetoresistance effectelements on a single minute chip where the magnetization directions ofthe pinned layers of the magnetoresistance effect elements cross eachother. Such a single chip has not been proposed yet, and therefore therearises a problem such that a magnetic sensor made of a single chip usinga magnetoresistance effect element cannot have a wider application rangedue to the restriction imposed on the magnetization direction of thepinned layer.

SUMMARY OF THE INVENTION

A characteristic feature of the present invention lies in a magneticsensor including a magnetoresistance effect element that contains apinned layer and a free layer, said magnetoresistance effect elementhaving a resistance value that changes in accordance with a relativeangle formed by (or between) the magnetization direction of the pinnedlayer and the magnetization direction of the free layer, said magneticsensor being formed in such a manner that a plurality of saidmagnetoresistance effect elements are provided on a single chip (one andthe same substrate), and the pinned layers of at least two of saidplurality of magnetoresistance effect elements have magnetizationdirections that cross each other.

This allows that, since magnetoresistance effect elements in which themagnetization directions of the pinned layers cross each other areformed on one and the same substrate, a magnetic sensor having a smallsize and a wide application range is provided.

Another characteristic feature of the present invention lies in a methodof producing a magnetic sensor including a magnetoresistance effectelement that contains a pinned layer and a free layer, saidmagnetoresistance effect element having a resistance value that changesin accordance with a relative angle formed by the magnetizationdirection of the pinned layer and the magnetization direction of thefree layer, said method including the steps of: forming a layercontaining a magnetic layer that will become said pinned layer (forexample, an antiferromagnetic layer and a ferromagnetic layer) in apredetermined configuration on a substrate: formingmagnetic-field-applying magnetic layers for applying a magnetic field tothe layer containing the magnetic layer that will become said pinnedlayer; magnetizing said magnetic-field-applying magnetic layers; andpinning the magnetization direction of the magnetic layer that willbecome said pinned layer with the residual magnetization of saidmagnetic-field-applying magnetic layers.

According to the method above, the magnetic-field-applying magneticlayers for applying a magnetic field to the layer containing themagnetic layer that will become the pinned layer are formed, forexample, by plating or the like, and thereafter thesemagnetic-field-applying magnetic layers are magnetized. The magneticfield produced by the residual magnetization of the aforesaidmagnetic-field-applying magnetic layers then pins the magnetizationdirection of the magnetic layer that will become the aforesaid pinnedlayer. In this case, the step of forming said magnetic-field-applyingmagnetic layers is advantageously a step of forming saidmagnetic-field-applying magnetic layers so as to sandwich the layercontaining the magnetic layer that will become said pinned layer in aplan view, and the magnetization direction of saidmagnetic-field-applying magnetic layers is advantageously different froma direction of the magnetic field produced by said residualmagnetization.

The direction of the magnetic field produced by the residualmagnetization of the aforesaid magnetic-field-applying magnetic layersis dependent on the shape of the end surface of themagnetic-field-applying magnetic layers. Therefore, by making a suitablyshaped end surface or by suitably placing the layer containing themagnetic layer that will become the pinned layer with respect to the endsurface, the layer containing the magnetic layer that will become thepinned layer can be imparted with a magnetization having an arbitrarydirection. This allows that two or more magnetoresistance effectelements having pinned layers with magnetizations pinned in differentdirections from each other can be easily produced on one and the samesubstrate.

Still another characteristic feature of the present invention lies in amethod of producing a magnetic sensor including a magnetoresistanceeffect element that contains a pinned layer and a free layer, saidmagnetoresistance effect element having a resistance value that changesin accordance with a relative angle formed by a magnetization directionof the pinned layer and a magnetization direction of the free layer,said method including the steps of preparing a magnet array constructedin such a manner that a plurality of permanent magnets are arranged atlattice points of a square lattice, where a polarity of a magnetic poleof each permanent magnet is different from a polarity of other magneticpoles that are adjacent thereto and spaced apart therefrom by theshortest distance; disposing a wafer in which a layer containing amagnetic layer that will at least become said pinned layer has beenformed, above said magnet array: and pinning the magnetization directionof the magnetic layer that will become said pinned layer by using amagnetic field formed between one of said magnetic poles and another ofsaid magnetic poles that is adjacent thereto and spaced apart therefromby the shortest distance.

The above-mentioned magnet array is constructed in such a manner that aplurality of permanent magnets are disposed at lattice points of asquare lattice, where a polarity of a magnetic pole of each permanentmagnet is different from a polarity of other magnetic poles that areadjacent thereto and spaced apart therefrom by the shortest distance.Therefore, above the magnet array, in a plan view of the magnet array, amagnetic field in the rightward direction from one N-pole to the S-polelocated on the right side of the N-pole, a magnetic field in the upwarddirection from the N-pole to the S-pole located on the upside of theN-pole, a magnetic field in the leftward direction from the N-pole tothe S-pole located on the left side of the N-pole, and a magnetic fieldin the downward direction from the N-pole to the S-pole located on thedownside of the N-pole are formed (See FIGS. 56 and 57). Similarly, toone S-pole, a magnetic field in the leftward direction from the N-polelocated on the right side of the S-pole, a magnetic field in thedownward direction from the N-pole located on the upside of the S-pole,a magnetic field in the rightward direction from the N-pole located onthe left side of the S-pole, and a magnetic field in the upwarddirection from the N-pole located on the downside of the S-pole areformed. The above-described method pins the magnetization direction ofthe layer that will become the pinned layer by using these magneticfields, whereby a magnetic sensor in which the magnetization directionsof the pinned layers cross each other (in this case, perpendicular toeach other) can be easily produced on a single chip.

BRIEF DESCRIPTION OF THE DRAWINGS

These and other objects, features, aspects, and advantages of thepresent invention will become more apparent from the following detaileddescription of the present invention when taken in conjunction with theaccompanying drawings, in which,

FIG. 1 is a conceptual plan view illustrating a magnetic sensoraccording to embodiment 1 and embodiment 2 of the present invention:

FIG. 2 is an enlarged view of the magnetic tunnel effect element (group)shown in FIG. 1;

FIG. 3 is a cross-sectional view of the magnetic tunnel effect element(group) shown in FIG. 2 and cut with a plane along the line 1—1;

FIG. 4 is a schematic plan view of the magnetic tunnel effect elementshown in FIG. 3, illustrating an antiferromagnetic film and aferromagnetic film (pinned layer) of the element;

FIG. 5 is a schematic cross-sectional view of the magnetic sensoraccording to embodiment 1 at one stage during the production;

FIG. 6 is a schematic cross-sectional view of the magnetic sensoraccording to embodiment 1 at one stage during the production;

FIG. 7 is a schematic cross-sectional view of the magnetic sensoraccording to embodiment 1 at one stage during the production:

FIG. 8 is a schematic cross-sectional view of the magnetic sensoraccording to embodiment 1 at one stage during the production;

FIG. 9 is a schematic cross-sectional view of the magnetic sensoraccording to embodiment 1 at one stage during the production;

FIG. 10 is a schematic cross-sectional view of the magnetic sensoraccording to embodiment 1 at one stage during the production;

FIG. 11 is a schematic cross-sectional view of the magnetic sensoraccording to embodiment 1 at one stage during the production;

FIG. 12 is a schematic cross-sectional view of the magnetic sensoraccording to embodiment 1 at one stage during the production;

FIG. 13 is a schematic plan view of the magnetic sensor according toembodiment 1 at one stage during the production:

FIG. 14 is a schematic cross-sectional view of the magnetic sensoraccording to embodiment 1 at one stage during the production;

FIG. 15 is a schematic cross-sectional view of the magnetic sensoraccording to embodiment 1 at one stage during the production;

FIG. 16 is a schematic cross-sectional view of the magnetic sensoraccording to embodiment 1 at one stage during the production;

FIG. 17 is a schematic cross-sectional view of the magnetic sensoraccording to embodiment 1 at one stage during the production;

FIG. 18 is a graph depicting the change of the MR ratio of one magnetictunnel effect element (group) shown in FIG. 1 when an external magneticfield changing in magnitude in the longitudinal direction (X-axisdirection) of the element is applied to the element;

FIG. 19 is a graph depicting the change of the MR ratio of One magnetictunnel effect element (group) shown in FIG. 1 when an external magneticfield changing in magnitude in the direction (Y-axis direction)perpendicular to the longitudinal direction of the element is applied tothe element:

FIG. 20 is a graph depicting the change of the MR ratio of the othermagnetic tunnel effect element (group) shown in FIG. 1 when on externalmagnetic field changing in magnitude in the direction (X-axis direction)perpendicular to the longitudinal direction of the element is applied tothe element;

FIG. 21 is a graph depicting the change of the MR ratio of the othermagnetic tunnel effect element (group) shown In FIG. 1 when an externalmagnetic field changing in magnitude in the longitudinal direction(Y-axis direction) of the element is applied to the element;

FIG. 22 is a schematic cross-sectional view of the magnetic sensoraccording to embodiment 2 at one stage during the production;

FIG. 23 is a schematic cross-sectional view of the magnetic sensoraccording to embodiment 2 at one stage during the production;

FIG. 24 is a schematic cross-sectional view of the magnetic sensoraccording to embodiment 2 at one stage during the production,

FIG. 25 is a schematic cross-sectional view of the magnetic sensoraccording to embodiment 2 at one stage during the production:

FIG. 26 is a schematic cross-sectional view of the magnetic sensoraccording to embodiment 2 at one stage during the production;

FIG. 27 is a schematic cross-sectional view of the magnetic sensoraccording to embodiment 2 at one stage during the production;

FIG. 28 is a schematic cross-sectional view of the magnetic sensoraccording to embodiment 2 at one stage during the production:

FIG. 29 is a schematic cross-sectional view of the magnetic sensoraccording to embodiment 2 at one stage during the production;

FIG. 30 is a schematic cross-sectional view of the magnetic sensoraccording to embodiment 2 at one stage during the production;

FIG. 31 is a schematic cross-sectional view of the magnetic sensoraccording to embodiment 2 at one stage during the production;

FIG. 32 is a schematic cross-sectional view of the magnetic sensoraccording to embodiment 2 at one stage during the production;

FIG. 33 is a schematic cross-sectional view of the magnetic sensoraccording to embodiment 2 at one stage during the production;

FIG. 34 is a schematic cross-sectional view of the magnetic sensoraccording to embodiment 2 at one stage during the production;

FIG. 35 is a schematic cross-sectional view of the magnetic sensoraccording to embodiment 2 at one stage during the production;

FIG. 36 is a graph depicting the change of the MR ratio of one magnetictunnel effect element (group) according to embodiment 2 when an externalmagnetic field changing in magnitude In the longitudinal direction(X-axis direction in FIG. 1) of the element is applied to the element;

FIG. 37 is a graph depicting the change of the MR ratio of one magnetictunnel effect element (group) according to embodiment 2 when an externalmagnetic field changing in magnitude in the direction (Y-axis directionin FIG. 1) perpendicular to the longitudinal direction of the element isapplied to the element;

FIG. 38 is a graph depicting the change of the MR ratio of the othermagnetic tunnel effect element (group) according to embodiment 2 when anexternal magnetic field changing in magnitude In the direction (X-axisdirection in FIG. 1) perpendicular to the longitudinal direction of theelement is applied to the element;

FIG. 39 is a graph depicting the change of the MR ratio of the othermagnetic tunnel effect element (group) according to embodiment 2 when anexternal magnetic field changing in magnitude in the longitudinaldirection (Y-axis direction in FIG. 1) of the element is applied to theelement;

FIG. 40 is a graph depicting the magnetization curves of a pinned layerand a free layer when a magnetic field changing in magnitude within thedirection perpendicular to the magnetization direction of the pinnedlayer is applied to a magnetic tunnel effect element group according toembodiment 1 and 2;

FIG. 41 is a plan view of another substrate, according to the presentinvention, having a differently configured plating film formed thereon;

FIG. 42 is a schematic plan view of a magnetic sensor according toembodiment 3 of the present invention;

FIG. 43 it a schematic enlarged plan view of the first X-axis GMRelement shown in FIG. 42;

FIG. 44 is a schematic cross-sectional view of the first X-axis GMRelement shown in FIG. 43 and cut with a plane along the line 2—2 of FIG.43;

FIG. 45 is a view illustrating a construction of a spin valve film ofthe first X-axis GMR element shown in FIG. 43;

FIG. 46 is a graph depicting the change in the resistance value (solidline) of the first X-axis GMR element shown in FIG. 43 relative to amagnetic field changing in the X-axis direction and the change in theresistance value (broken line) of the element relative to a magneticfield changing in the Y-axis direction;

FIG. 47 is an equivalent circuit diagram of an X-axis magnetic sensorincluded in the magnetic sensor shown in FIG. 42;

FIG. 48 is a graph depicting the change in the output voltage (solidline) of the X-axis magnetic sensor shown in FIG. 47 relative to amagnetic field changing in the X-axis direction and the change in theoutput voltage (broken line) of the sensor relative to a magnetic fieldchanging in the Y-axis direction;

FIG. 49 is a graph depicting the change in the output voltage (solidline) of the Y-axis magnetic sensor included in the magnetic sensorshown in FIG. 42 relative to a magnetic field changing in the X-axisdirection and the change in the output voltage (broken line) of thesensor relative to a magnetic field changing in the Y-axis direction;

FIG. 50 is a plan view of quartz glass on which a spin valve film hasbeen formed at one stage during the production of the magnetic sensorshown in FIG. 42;

FIG. 51 is a plan view of a metal plate for preparing a magnet array tobe used in thie production of the magnetic sensor shown in FIG. 42;

FIG. 52 is a cross-sectional view of the metal plate and the permanentbar magnets shown in FIG. 51 and cut with a plane along the line 3—3 ofFIG. 51;

FIG. 53 is a plan view of a plate for forming a magnet array to be usedin the production of the magnetic sensor shown in FIG. 42;

FIG. 54 is a cross-sectional view of the magnet array to be used in theproduction of the magnetic sensor shown in FIG. 42;

FIG. 55 is a cross-sectional view showing a step in the production ofthe magnetic sensor shown in FIG. 42;

FIG. 56 is a perspective view illustrating some magnets taken out fromthe magnet array shown in FIG. 54;

FIG. 57 is a conceptual view illustrating a method for pinning themagnetization direction of the pinned layer of each GMR element of themagnetic sensor shown in FIG. 42;

FIG. 58 is a view illustrating a relationship between the magneticsensor shown in FIG. 42 and the azimuth; and

FIG. 59 is a graph depicting an output voltage of the magnetic sensorshown in FIG. 42 relative to the azimuth.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

Hereafter, embodiments of the magnetic sensor according to the presentinvention will be described with reference to the attached drawings. Themagnetic sensor according to the first embodiment includes a generallysquare-shaped substrate 10 made of, for example, SiO₂/Si, glass, orquartz, two magnetic tunnel affect elements (groups) 11, 21, a coil 30for bias magnetic field, and a plurality of electrode pads 40 a to 40 f,as illustrated in the plan view of FIG. 1. Magnetic tunnel effectelements (groups) 11, 21 and coil 30 for bias magnetic field areconnected respectively to electrode pads 40 a, 40 b, 40 c, 40 d, and 40e, 40 f. Since magnetic tunnel effect element (group) 11 and magnetictunnel effect element (group) 21 are identical in structure, magnetictunnel effect element (group) 11 will be described hereafter as arepresentative example, and the description of magnetic tunnel effectelement (group) 21 will be omitted.

Magnetic tunnel effect element (group) 11 is made of a plurality of (inthis example, twenty) magnetic tunnel effect elements that are connectedin series, as illustrated in the enlarged plan view of FIG. 2. Eachmagnetic tunnel effect element includes a plurality of lower electrodes12 having a rectangular shape in a plan view on substrate 10, asillustrated in FIG. 3 showing a partial cross-sectional view along the1—1 plane of FIG. 2. Lower electrodes 12 are arranged in a row andspaced apart from each other by a predetermined distance in the lateraldirection. Lower electrodes 12 are made of Ta (which may be Cr or Ti),which is an electrically conductive non-magnetic metal material, and areformed to have a thickness of about 30 nm. On each lower electrode 12 isrespectively laminated an antiferromagnetic film 13 made of PtMn havinga thickness of about 30 nm and formed to have the same planar shape aslower electrode 12.

A pair of ferromagnetic films 14, 14 made of NiFe having a thickness ofabout 20 nm is laminated at an interval on each antiferromagnetic film13. These ferromagnetic films 14, 14 have a rectangular shape in a planview and are arranged sQ that the longer sides thereof oppose each otherin parallel. The ferromagnetic films 14, 14 constitute a pinned layer inwhich the magnetization direction is pinned by the antiferromagneticfilm 13. The ferromagnetic films 14, 14 are magnetized in the directionof arrows in the partially enlarged plan view of FIG. 4 (i.e. in therightward direction). Here, the antiferromagnetic film 13 and theferromagnetic films (pinned layers) 14, 14 constitute a fixedmagnetization layer in which the magnetization direction of theferromagnetic films 14, 14 is substantially fixed (i.e. having a fixedmagnetization axis).

On each ferromagnetic film 14 is formed an insulating layer 15 havingthe same planar shape as the ferromagnetic film 14. This insulatinglayer 15 is made of Al₂O₃ (Al—O), which is an insulating material, andis formed to have a thickness of about 1 nm.

On the insulating layer 15 is formed a ferromagnetic film 16 having thesame planar shape as the insulating layer 15 and made of NiFe with athickness of about 80 nm. This ferromagnetic film 16 constitutes a freelayer (free magnetization layer) whose magnetization direction changesin accordance with the direction of an external magnetic field, andconstitutes a magnetic tunnel junction structure together with thepinned layer made of the aforesaid ferromagnetic film 14 and theaforesaid insulating layer 15. In other words, the antiferromagneticfilm 13, the ferromagnetic film 14, the insulating layer 15, and theferromagnetic film 16 constitute one magnetic tunnel effect element(excluding the electrodes and others).

On each ferromagnetic film 16 is respectively formed a dummy film 17having the same planar shape as each ferromagnetic film 16. This dummyfilm 17 is constituted with an electrically conductive non-magneticmetal material made of a Ta film having a thickness of about 40 nm.

An interlayer insulating layer 18 for insulated separation of theplurality of lower electrodes 12 and the antiferromagnetic film 13 andfor respective insulated separation of the pair of ferromagnetic films14, the insulating layers 15 the ferromagnetic films 16, and the dummyfilms 17 disposed on each antiferromagnetic film 13 is formed in aregion that covers the substrate 10, lower electrode 12,antiferromagnetic film 13, ferromagnetic films 14, insulating layers 15,ferromagnetic films 16, and dummy films 17. The interlayer insulatinglayer 18 is made of SiO₂ and has a thickness of about 250 nm.

Through this interlayer insulating layer 18, a contact hole 18 a isrespectively formed on each dummy film 17. Upper electrodes 19, 19 madeof, for example, Al having a thickness of about 300 nm are respectivelyformed so as to fill in the contact hole 18 a and to electricallyconnect each one of the pair of dummy films 17, 17 disposed on adifferent lower electrode 12 (and antiferromagnetic film 13). Thus, byelectrically connecting each of the ferromagnetic films 16, 16 (each ofthe dummy films 17, 17) and each of the antiferromagnetic films 13, 13of a pair of adjacent magnetic tunnel junction structures alternatelyand successively with the lower electrode 12, antiferromagnetic film 13,and upper electrode 19, there is formed a magnetic tunnel effect element(group) 11 in which a plurality of magnetic tunnel junction structureswhose pinned layers have the same magnetization direction are connectedin series. Here, a protective film made of SiO and SiN (illustrationomitted) is formed on the upper electrodes 19, 19.

The coil 30 is for imparting a bias magnetic field of alternatingcurrent to the above-described magnetic tunnel effect elements (groups)11, 21, and is buried in the upper part of substrate 10 so as to extendunder the magnetic tunnel effect elements (groups) 11, 21 in a directionparallel to the magnetization direction of the pinned layer of themagnetic tunnel effect elements (groups) 11, 21.

Next, a method of producing the above-mentioned magnetic tunnel effectelements will be described with reference to FIGS. 5 to 17. Here, inFIGS. 5 to 12 and FIGS. 14 to 17, a magnetic tunnel effect element groupmade of four magnetic tunnel effect elements that are connected inseries is shown for the sake of description. Further, in these Figures,illustration of coil 30 is omitted.

First, as illustrated in FIG. 5, a film made of Ta constituting thelower electrode 12 is formed to a thickness of about 30 nm by sputteringon a substrate 10 (which is, at this stage, one sheet of substrate fromwhich a plurality of magnetic sensors will be obtained by a later dicingprocess). Then, a film made of PtMn and a film made of NiFe forconstructing the antiferromagnetic film 13 and the ferromagnetic film(pinned layer) 14 of the fixed magnetization layer are formed to have athickness of 30 nm in and 20 nm, respectively, by sputtering. In thisdescription, the lower electrode 12, the PtMn film which will be theantiferromagnetic film 13, and the FeNi film which will be theferromagnetic film 14 are referred to as a lower magnetic layer SJ.

Thereafter, Al is laminated for only 1 nm, and this is oxidized byoxygen gas to form an Al₂O₃ (Al—O) film which will become the insulatinglayer 15. Subsequently, a film made of NiFe constituting theferromagnetic film 16 of the free layer is formed, for example, to havea thickness of 80 nm by sputtering, and a film made of Ta constitutingthe dummy film 17 is formed to have a thickness of 40 nm thereon. Here,the ferromagnetic film 16 and the dummy film 17 are referred to as anupper magnetic layer UJ. Next, by ion milling or the like, the uppermagnetic layer UJ is processed for separation, as illustrated in FIG. 6,and the lower magnetic layer SJ is processed for separation, asillustrated in FIG. 7. As a result, the layer having a predeterminedconfiguration, which will be the magnetic tunnel effect elements, isformed.

Next, as illustrated in FIG. 8, a film made of SiO₂ constituting theinterlayer insulating layer 18 is formed by sputtering so that thethickness thereof on the elements will be 250 nm, and a film made of Crand a film made of NiFe are formed thereon by sputtering to have athickness of 100 nm and 50 nm, respectively, as a plating underlayerfilm. Next, a resist 51 is applied, as illustrated in FIG. 9. The resist51 is patterned into a predetermined shape so as not to cover the partwhere the plating will be carried out later.

Next, as Illustrated in FIG. 10, the wafer is plated with NiCo as amagnetic-field-applying magnetic layer. The a thickness of NiCo is, forexample, set to be 10 μm. Then, after the resist is removed asillustrated in FIG. 11, the entire surface is subjected to milling (Armilling) to remove NiFe formed as the plating underlayer film, asillustrated in FIG. 12.

FIG. 13 is a plan view of the wafer in this state. Here, in FIG. 13,each of the substrates that will be separated from each other by a laterdicing process are denoted with the reference numeral 10 for conveniencesake. Referring to FIG. 13, by the previous patterning of the resist,the magnetic-field-applying magnetic layers (NiCo) are each formed tohave a generally square shape with its center located at the center offour adjacent substrates 10 which will be separated from each otherlater, and are disposed so as to exclude parts (its portions) locatedimmediately above the magnetic tunnel effect elements (groups) 11, 21 inthe longitudinal direction and in the lateral direction (i.e. so as tosandwich the layer, having the predetermined configuration, that will bethe magnetic tunnel affect elements (groups) 11, 21 where the lowermagnetic layer SJ including the magnetic layer that will be the pinnedlayer is formed in a plan view). In this state, a magnetic field havinga strength of about 1000 (Oe) is given in the direction parallel to thediagonal line of the square that each magnetic-field-applying magneticlayer forms, so as to magnetize the magnetic-field-applying magneticlayer in the direction shown by arrow A in FIG. 13.

Next, the aforesaid magnetic field is removed. At this time, theresidual magnetization of the magnetic-field-applying magnetic layergenerates a magnetic field in the direction from the upper side of eachmagnetic-field-applying magnetic layer to the lower side of an adjacentmagnetic-field-applying magnetic layer and a magnetic field in thedirection from the right side of each magnetic-field-applying magneticlayer to the left side of an adjacent magnetic-field-applying magneticlayer, as shown by arrows B in FIG. 13. For this reason, to the partsthat will become the magnetic tunnel effect elements (groups) 11, 21, amagnetic field parallel to the longitudinal direction of the parts isapplied. Then, in order to form the antiferromagnetic film 13 made ofPtMn into an ordered alloy and to impart an exchange coupling magneticfield Hex, a high-temperature annealing process is carried out to putthe wafer into a high-temperature environment. As a result of this, themagnetic tunnel effect elements (groups) 11, 21 formed on one and thesame substrate 10 will have pinned layers that are magnetized (pinned)in different directions from each other (in this case, in the directionsthat are perpendicular to each other). In other words, the magnetictunnel effect elements (groups) 11, 21 will each have a fixedmagnetization axis in the direction shown by the arrows in FIG. 1.

Subsequently, as illustrated in FIG. 14, the NiCo which is the platingfilm and the sputtered NiFe (which is the plating underlayer film) areremoved by acid, and Cr is removed by milling, as illustrated in FIG.15. Thereafter, as illustrated in FIG. 16, a contact hole 18 a is formedthrough the interlayer insulating film 18; an Al film is formed to havea thickness of 300 nm by sputtering as illustrated in FIG. 17; and theAl film is processed in a wiring pattern to form an upper electrode 19.

Then, electrode pads 40 a to 40 f illustrated in FIG. 1 are formed onthe substrate 10, and the electrode pads 40 a to 40 f are respectivelyconnected to the magnetic tunnel effect elements (groups) 11, 21 and thecoil 30. Finally, a film (not illustrated) made of SiO having athickness of 150 nm and a film (not illustrated) made of SiN having athickness of 1000 nm are formed as a protective film (passivation film)by CVD. Thereafter, a part of the protective film is opened by milling,RIE, or etching using a resist mask to expose the electrode pads 40 a to40 f. Subsequently, the substrate is subjected to back grinding(thinning by grinding); the substrate is separated into individualmagnetic sensors by dicing; and finally, the packaging is carried out.

To the magnetic tunnel effect element (group) 11 thus produced and shownin FIG. 1, external magnetic fields changing in magnitude along therespective axes in the X-axis direction shown in FIG. 1 and in theY-axis direction perpendicular to the X-axis were applied, so as tomeasure the resistance changing ratio MR (MR ratio) at the time themagnetic fields were applied. The results are shown in FIGS. 18 and 19.As will be clear from FIGS. 18 and 19, the MR ratio of the magnetictunnel effect element (group) 11 changed more greatly in response to theexternal magnetic field changing in the X-axis direction than to theexternal magnetic field changing in the Y-axis direction. This hasconfirmed that, in the magnetic tunnel effect element (group) 11, themagnetization direction of the pinned layer thereof is parallel to theX-axis.

Similarly, to the magnetic tunnel effect element (group) 21 shown inFIG. 1, external magnetic fields changing in magnitude along therespective axes in the X-axis direction and in the Y-axis direction wereapplied, so as to measure the resistance changing ratio MR (MR ratio) atthe time the magnetic fields were applied. The results are shown inFIGS. 20 and 21. As will be clear from FIGS. 20 and 21, the MR ratio ofthe magnetic tunnel effect element (group) 21 changed more greatly inresponse to the external magnetic field changing in the Y-axis directionthan to the external magnetic field changing in the X-axis direction.This has confirmed that, in the magnetic tunnel effect element (group)21, the magnetization direction of the pinned layer thereof is parallelto the Y-axis. In other words, it has been confirmed that, on one andthe same substrate 10, this magnetic sensor has two magnetic tunneleffect elements (magnetoresistance effect elements) having pinned layersthat are pinned so that the magnetization directions thereof aredifferent from each other (i.e. so that the magnetization directionsthereof cross each other).

Next, a magnetic sensor according to the second embodiment will bedescribed. The second embodiment is different from the first embodimentonly in that, whereas the fixed magnetization layer of the firstembodiment is constituted with PtMn and NiFe, the fixed magnetizationlayer of the second embodiment is constituted with a film made of MnRhhaving a thickness of 30 nm and a film made of NiFe (pinned layer)having a thickness of 40 nm. On the other hand, by this difference inthe material of the fixed magnetization layer, the method of producingthe second embodiment is a little different from that of the firstembodiment, which will be described as follows.

Namely, in the second embodiment, as illustrated in FIG. 22, a film madeof Ta having a thickness of 30 nm, a film made of MnRh having athickness of 30 nm, and a film made of NiFe having a thickness of 40 nmare formed on a substrate 10 by sputtering so as to form a lowermagnetic layer SJ. Subsequently, an Al film of 1 nm is formed andoxidized to form an insulating layer 15. A film made of NiFe having athickness of 40 nm and a film made of Ta having a thickness of 40 nm areformed thereon so as to form an upper magnetic layer UJ.

Subsequently, as illustrated In FIG. 23, the upper magnetic layer UJ isprocessed for separation, and the lower magnetic layer SJ is processedfor separation, as illustrated in FIG. 24. Next, as illustrated in FIG.25, SiO₂ is sputtered to form a film having a thickness of 250 nm so asto form an interlayer insulating layer 18, and successively a contacthole 18 a is formed through the interlayer insulating layer 18, asillustrated in FIG. 26. Subsequently, as illustrated in FIG. 27, Al issputtered to form a film having a thickness of 300 nm and processed in awiring pattern to form an upper electrode 19. Then, as illustrated inFIG. 28, a protective film 20 made of SiO and SiN is formed by CVD.

Next, as illustrated in FIG. 29, a film made of Cr and a film made ofNiFe are formed by sputtering to have a thickness of 100 nm and 50 nm,respectively, as a plating underlayer film, and successively, a resist51 is applied, as illustrated in FIG. 30. The resist 51 is patternedinto a predetermined shape so as not to cover the part where the platingwill be carried out later.

Next, as illustrated in FIG. 31, the wafer is plated with NiCo as amagnetic-field-applying magnetic layer. The thickness of NiCo is, forexample, set to be 10 μm. Then, after the resist is removed asillustrated in FIG. 32, the entire surface is subjected to milling (Armilling) to remove NiFe formed as the plating underlayer film, asillustrated in FIG. 33. At this stage, the wafer is in the state shownin FIG. 13. In this state, a magnetic field having a strength of about1000 (Oe) is given in the direction parallel to the diagonal line of thesquare that each magnetic-field-applying magnetic layer forms, so as tomagnetize the magnetic-field-applying magnetic layer in the directionshown by arrow A In FIG. 13. Thereafter, the magnetic field is removed.

At this time, to the parts that will later become the magnetic tunneleffect elements (groups) 11′, 21′, a magnetic field parallel to thelongitudinal direction of the parts is applied by the residualmagnetization of NiCo. Then, a high-temperature annealing process iscarried out to put the wafer into a high-temperature environment. As aresult of this, the magnetic tunnel effect elements (groups) 11′, 21′formed on one and the same substrate 10′ will have pinned layers thatare magnetized (pinned) in different directions from each other (in thiscase, in the directions that are perpendicular to each other). After thehigh-temperature annealing process is finished, the plating film NiCoand the plating underlayer film NiFe are removed by acid as illustratedin FIG. 34, and the plating underlayer film Cr is removed by milling, asillustrated in FIG. 35. Thereafter, a process similar to that of thefirst embodiment is carried out.

To the magnetic tunnel effect element (group) 11′ thus produced andshown in FIG. 1, external magnetic fields changing in magnitude alongthe respective axes in the X-axis direction and in the Y-axis directionwere applied, so as to measure the resistance changing ratio MR (MRratio) at the time the magnetic fields were applied. The results areshown in FIGS. 36 and 37. As will be clear from FIGS. 36 and 37, the MRratio of the magnetic tunnel effect element (group) 11′ changed moregreatly in response to the external magnetic field changing in theX-axis direction than to the external magnetic field changing in theY-axis direction. This has confirmed that, in the magnetic tunnel effectelement (group) 11′, the magnetization direction of the pinned layerthereof is parallel to the X-axis.

Similarly, to the magnetic tunnel effect element (group) 21 shown inFIG. 1, external magnetic fields changing in magnitude along therespective axes in the X-axis direction and in the Y-axis direction wereapplied, so as to measure the resistance changing ratio MR (MR ratio) atthe time the magnetic fields were applied. The results are shown inFIGS. 38 and 39. As will be clear from FIGS. 38 and 39, the MR ratio ofthe magnetic tunnel effect element (group) 21′ changed more greatly inresponse to the external magnetic field changing in the Y-axis directionthan to the external magnetic field changing in the X-axis direction.This has confirmed that, in the magnetic tunnel effect element (group)21′, the magnetization direction of the pinned layer thereof is parallelto the Y-axis. In other words. it has been confirmed that, on one andthe same substrate 10′, this magnetic sensor according to the secondembodiment has two magnetic tunnel effect elements (magnetoresistanceeffect elements) having pinned layers that are pinned so that themagnetization directions thereof cross each other (i.e. are differentfrom each other).

As described above, the magnetic sensors according to the first andsecond embodiments have, on one and the same substrate (on a singlechip), magnetic tunnel effect elements in which the magnetizationdirections of the pinned layers cross each other (i.e. the magnetizationdirections of at least two of the pinned layers form an angle other than0° and 180°). For this reason, these magnetic sensors can be used as asmall magnetic sensor (for example, as a geomagnetism sensor or thelike) that is requested to detect magnetic fields in differentdirections. Also, according to the methods of the above-describedembodiments, these sensors can be easily produced.

Here, in the first embodiment, since PtMn is used in the fixedmagnetization layer as a pinning layer, the magnetization direction ofthe pinned layer in the fixed magnetization layer must be pinned at thetiming at which the wafer is initially brought to a high temperature.Therefore, in tile first embodiment, the wafer is subjected to ahigh-temperature annealing process at a stage prior to thehigh-temperature process by CVD or the like that is carried out forforming the protective film. In contrast, in the second embodiment, MnRhis used as a pinning layer of the fixed magnetization layer. The MnRhfilm will be deteriorated in quality if another high-temperature processis carried out after the high-temperature annealing process. Therefore,in the second embodiment, the high-temperature annealing process iscarried out after the high-temperature process by CVD or the like forforming the protective film is carried out.

Further, according to the above-described production methods of thefirst and second embodiments, one can obtain a magnetic tunnel effectelement (group) that exhibits an even-function property to an externalmagnetic field to be detected. In other words, when a magnetic fieldchanging in magnitude within the direction perpendicular to themagnetization direction of the pinned layer is applied to the magnetictunnel effect element groups 11, 21, 11′, 21′, the magnetization of thepinned layer changes smoothly as illustrated by the line LP of FIG. 40.On the other hand, the free layer of these elements reacts sensitivelyto the direction of the aforesaid external magnetic field due to theshape anisotropy, and the magnetization of the free layer changes in astepwise manner when the magnitude of the external magnetic fieldapproaches the neighborhood of “0”, as Illustrated by the line LF ofFIG. 40, As a result of this, the relative angle formed between themagnetization direction of the pinned layer and the magnetizationdirection of the free layer attains the maximum value (approximately90°) when the external magnetic field is “0” and, according as themagnitude (absolute value) of the external magnetic field increases, therelative angle decreases. This can be confirmed by FIGS. 19, 20, 37, and38.

Further, as will be also clear from FIG. 13, when a plating film (NiCo)constituting each magnetic-field-applying magnetic layer is magnetizedin a predetermined direction shown by arrow A in FIG. 13, the directionof the magnetic field generated between the plating films by theresidual magnetization of the plating films will be different from themagnetization direction of the plating films but will be the directionperpendicular to the end surfaces of the plating films M as shown byarrows B in FIG. 13. Therefore, if the end surface shape of the platingfilms M is designed, for example, as shown in FIG. 41 and the platingfilms are magnetized in the direction shown by arrow C, a magnetic fieldhaving a desired direction (direction shown by arrows D) can be locallygenerated at a suitable position on the wafer. Therefore, by using this,one can produce magnetic tunnel effect elements TMR1, TMR2 having fixedmagnetization axes in desired directions on a single substrate (magnetictunnel effect elements TMR1, TMR2 in which the magnetization directionsof the pinned layers cross each other on a single chip).

Next, a magnetic sensor according to the third embodiment of the presentinvention will be described. While the magnetic sensors of theabove-described first and second embodiments are constituted with TMRelements, the magnetic sensor of the third embodiment is constitutedwith GMR elements. Further, this magnetic sensor is provided with anX-axis magnetic sensor for detecting a magnetic field in the X-axisdirection and a Y-axis magnetic sensor for detecting a magnetic field inthe Y-axis direction perpendicular to the aforesaid X-axis.

More specifically described, this magnetic sensor 60 has a rectangular(generally square) shape having sides along the X-axis and the Y-axisthat are perpendicular to each other in a plan view as illustrated inFIG. 42, and includes a single chip (same substrate) 60 a made of quartzglass having a small thickness in the Z-axis direction perpendicular tothe X-axis and the Y-axis, a sum of eight GMR elements 61 to 64, 71 to74 formed on the chip 60 a, a sum of eight pads 65 to 68, 75 to 78formed on the chip 60 a. and a connecting line that connects the padsand the elements.

The first X-axis GMR element 61 is formed in a neighborhood of the endof the chip 60 a in the negative direction of the X-axis and a littlebelow a generally central part of the chip 60 a in the Y-axis direction,and the pinned magnetization direction of the pinned layer is in thenegative direction of the X-axis, as illustrated by an arrow in FIG. 42.The second X-axis GMR element 62 is formed in a neighborhood of the endof the chip 60 a in the negative direction of the X-axis and a littleabove a generally central part of the chip 60 a in the Y-axis direction,and the pinned magnetization direction of the pinned layer is in thenegative direction of the X-axis, as illustrated by an arrow in FIG. 42.The third X-axis GMR element 63 is formed in a neighborhood of the endof the chip 60 a in the positive direction of the X-axis and a littleabove a generally central part of the chip 60 a in the Y-axis direction,and the pinned magnetization direction of the pinned layer is in thepositive direction of the X-axis, as Illustrated by an arrow in FIG. 42.The fourth X-axis GMR element 64 is formed in a neighborhood of the endof the chip 60 a in the positive direction of the X-axis and a littlebelow a generally central part of the chip 60 a in the Y-axis direction,and the pinned magnetization direction of the pinned layer is in thepositive direction of the X-axis, as illustrated by an arrow in FIG. 42.

The first Y-axis GMR element 71 is formed in a neighborhood of the endof the chip 60 a in the positive direction of the Y-axis and a little tothe left of a generally central part of the chip 60 a in the X-axisdirection, and the pinned magnetization direction of the pinned layer isin the positive direction of the Y-axis, as illustrated by an arrow inFIG. 42. The second Y-axis GMR element 72 is formed in a neighborhood ofthe end of the chip 60 a in the positive direction of the Y-axis and alittle to the right of a generally central part of the chip 60 a in theX-axis direction, and the pinned magnetization direction of the pinnedlayer is in the positive direction of the Y-axis, as illustrated by anarrow in FIG. 42. The third Y-axis GMR element 73 is formed in aneighborhood of the end of the chip 60 a in the negative direction ofthe Y-axis and a little to the right of a generally central part of thechip 60 a in the X-axis direction, and the pinned magnetizationdirection of the pinned layer is in the negative direction of theY-axis, as Illustrated by an arrow in FIG. 42. The fourth Y-axis GMRelement 74 is formed in a neighborhood of the end of the chip 60 a inthe negative direction of the Y-axis and a little to the left of agenerally central part of the chip 60 a in the X-axis direction, and thepinned magnetization direction of the pinned layer is in the negativedirection of the Y-axis, as illustrated by an arrow in FIG. 42.

The GMR elements 61 to 64, 71 to 74 have substantially the samestructure with each other except that the position thereof on the chip60 a and the pinned magnetization direction of the pinned layer relativeto the chip 60 a are different. Therefore, the structure thereof will bedescribed hereafter using the first X-axis GMR element 61 as arepresentative example.

H The first X-axis GMR element 61 includes a plurality of narrowband-shaped parts 61 a . . . 61 a made of a spin valve film SV andhaving a longitudinal direction in the Y-axis direction and bias magnetfilms (hard ferromagnetic thin film layers) 61 b . . . 61 b made of ahard ferromagnetic material such as CoCrPt formed under the two ends ofeach narrow band-shaped part 61 a in the Y-axis direction and having ahigh magnetic coercive force and a high square ratio, as illustrated inFIG. 43 which is a plan view and in FIG. 44 which is a schematiccross-sectional view of the first X-axis GMR element 61 cut with a planealong the line 2—2 of FIG. 43. Each of the narrow band-shaped parts 61 a. . . 61 a extends in the X-axis direction on the upper surface of eachbias magnet film 61 b and is bonded to an adjacent narrow band-shapedpart 61 a.

The spin valve film SV of the first X-axis GMR element 61 is, as shownby the film construction in FIG. 45, composed of a free layer (freemagnetization layer) F, an electrically conductive spacer layer S madeof Cu having a thickness of 2.4 an (24 Å), a fixed magnetization layerP, and a cap layer C made of titanium (Ti) or tantalum (Ta) having athickness of 2.5 nm (25 Å) which are successively laminated on a chip 60a constituting a substrate.

The free layer F is a layer whose magnetization direction changes inaccordance with the direction of an external magnetic field, and iscomposed of a CoZrNb amorphous magnetic layer 61-1 formed immediatelyabove the substrate 60 a and having a thickness of 8 nm (80 Å), a NiFemagnetic layer 61-2 formed on the CoZrNb amorphous magnetic layer 61-1and having a thickness of 3.3 nm (33 Å), and a CoFe layer 61-3 formed onthe NiFe layer 61-2 and having a thickness of about 1 to 3 nm (10 to 30Å). The CoZrNb amorphous magnetic layer 61-1 and the NiFe magnetic layer61-2 constitute a soft ferromagnetic thin film layer. The CoFe layer61-3 is for preventing diffusion of Ni in the NiFe layer 61-2 and Cu61-4 in the spacer layer S. Here, the above-described bias magnet films61 b . . . 61 b apply a bias magnetic field to the free layer F in theY-axis direction (right and left directions shown by arrows in FIG. 43)for maintaining the uniaxial anisotropy of the free layer F.

The fixed magnetization layer P is a lamination of a CoFe magnetic layer61-5 having a thickness of 2.2 nm (22 Å) and an antiferromagnetic film61-6 formed from a PtMn alloy containing 45 to 55 molt of Pt and havinga thickness of 24 nm (240 Å). The CoFe magnetic layer 61-5 is lined withthe magnetized antiferromagnetic film 61-6 in an exchange couplingmanner so as to constitute a pinned layer whose magnetization direction(magnetization vector) is pinned (fixed) in the negative direction ofthe X-axis.

The first X-axis GMR element 61 thus constructed exhibits a resistancevalue that changes generally in proportion to an external magnetic fieldthat changes along the X-axis in the range from −Hc to +Hc, as shown bya solid line in FIG. 46, and exhibits a generally constant resistancevalue to an external magnetic field that changes along the Y-axis, asshown by a broken line in FIG. 46.

The X-axis magnetic sensor is constructed by full bridge connection ofthe first to fourth X-axis GMR fir elements 61 to 64. as shown by anequivalent circuit in FIG. 47. Here, in FIG. 47, the arrows show pinnedmagnetization directions of the pinned layers of the GMR elements 61 to64. In such a construction, the pad 67 and the pad 68 are connectedrespectively to the positive electrode and the negative electrode of aconstant power source (not illustrated) so as to give a voltage Vxin+ (5V in this example) and a voltage Vxin− (0 V in this example). Then, thevoltages of the pad 65 and the pad 66 are taken out as a voltage Vxout+and a voltage Vxout−, and the voltage difference thereof (Vxout+-Vxout−)is taken out as a sensor output VXout. As a result of this, the X-axismagnetic sensor shows an output voltage Vxout that changes generally inproportion to an external magnetic field that changes along the X-axisin the range from −Hc to +Hc, as shown by a solid line in FIG. 48, andshows a generally “0” output voltage to an external magnetic field thatchanges along the Y-axis, as shown by a broken line in FIG. 48.

The Y-axis magnetic sensor is constructed by full bridge connection ofthe first to fourth Y-axis GMR elements 71 to 74 in the same manner asthe X-axis magnetic sensor. Further, the pad 77 and the pad 78 areconnected respectively to the positive electrode and the negativeelectrode of a constant power source (not illustrated) so as to give avoltage Vyin+ (5 V in this example) and a voltage Vyin− (0 V in thisexample). Then, the voltage difference between the pad 75 and the pad 76is taken out as a sensor output Vyout. As a result of this, the Y-axismagnetic sensor shows an output voltage Vyout that changes generally inproportion to an external magnetic field that changes along the Y-axisin the range from −Hc to +Hc, as shown by a broken line in FIG. 49, andshows a generally “0” output voltage to an external magnetic field thatchanges along the X-axis, as shown by a solid line in FIG. 49.

Next, a method of producing the magnetic sensor 60 constructed in theaforesaid manner will be described. First, a plurality of films M, whichare made of the aforesaid spin valve film SV and the aforesaid biasmagnet film 61 b, and which will constitute individual GMR elements, areformed in a manner like islands on a rectangular quartz glass 60 al, asillustrated by the plan view of FIG. 50. The films M are formed bysuccessive lamination to precise thicknesses using a ultra high vacuumapparatus. These films M are formed so that the films M will be locatedat the positions of the GMR elements 61 to 64, 71 to 74 shown in FIG. 42when the quartz glass 60 al is cut along the broken line of FIG. 50 by acutting process carried out later and separated into individual chips 60a shown in FIG. 42. Further, alignment (positioning) marks 60 b having arectangular shape excluding a shape of a cross are formed at the fourcorners of the quarts glass 60 al.

Next, as shown in FIG. 51 which is a plan view and in FIG. 52 which is across-sectional view cut with the cross section along the line 3—3 ofFIG. 51, a rectangular metal plate 81 is prepared in which a pluralityof square through-holes are formed in a square lattice configuration(namely, square through-holes having sides parallel to the X-axis andthe Y-axis are formed to be equally spaced apart from each other alongthe X-axis and the Y-axis). Then, permanent bar magnets 82 . . . 82having a rectangular parallelopiped shape and having approximately thesame square cross section as the through-holes are inserted into thethrough-holes of the metal plate 81 so that the end surfaces of thepermanent bar magnets 82 . . . 82, where the magnetic poles are formed,will be parallel to the metal plate 81. At this time, the permanent barmagnets 82 . . . 82 are arranged so that the polarity of the magneticpole of each permanent bar magnet 82 will be different from the polarityof the magnetic pole of the other permanent bar magnets 82 adjacentthereto and space apart therefrom by the shortest distance. Here, thepermanent bar magnets 82 . . . 82 to be used have a magnetic charge ofthe same magnitude.

Next, as shown in a plan view of FIG. 53, a plate 83 is prepared whichhas a thickness of about 0.5 mm and which is made of transparent quartzglass having approximately the same rectangular shape as the aforesaidmetal plate 81. This plate 83 is let to have alignment (positioning)marks 83 a having a shape of a cross on the four corners for positioningin cooperation with the alignment marks 60 b of the aforesaid quartsglass 60 al. Further, in the central part, alignment marks 83 b areformed at positions corresponding to the outer shape of the permanentbar magnets 82 . . . 82 that are inserted into the aforesaid metal plate81. Subsequently, as illustrated in FIG. 54, the upper surface of thepermanent bar magnets 82 . . . 82 are bonded to the lower surface of theplate 83 by means of an adhesive. At this time, the relative position ofthe permanent bar magnets 82 . . . 82 to the plate 83 is determined byusing the alignment marks 83 b. Then, the metal plate 81 is removed fromthe lower side. At this stage, the permanent bar magnets 82 . . . 82 andthe plate 83 form a magnet array constructed in such a manner that aplurality of permanent magnets having square end surfaces constitutingthe magnetic poles are disposed at lattice points of a square latticeand the polarity of the magnetic pole of each permanent magnet isdifferent from the polarity of the magnetic pole of the other permanentmagnets adjacent thereto and spaced apart therefrom by the shortestdistance.

Next, as illustrated in FIG. 55, the quartz glass 60 al, on Which thefilms to become the GMR elements (the layer containing the magneticlayer to become the pinned layer, that is, the layer containing themagnetic layer to become the fixed magnetization layer) are formed, ispositioned so that the surface on which the films to become the GMRelements are formed will be brought into contact with the upper surfaceof the plate 83. The relative position of the quartz glass 60 al to theplate 83 is exactly determined by bringing the cross shape of thealignment marks 83 a into respective coincidence with the part of theaforesaid alignment marks 60 b where the cross shape has been removed.

FIG. 56 is a perspective view illustrating a state in which four of theaforesaid permanent bar magnets 82 . . . 82 have been taken out. As willbe clear from this figure, above the upper surface of the permanent barmagnets 82 . . . 82, magnetic fields are formed from one N-pole towardsthe four S-poles adjacent to the N-pole by the shortest distance, i.e.in four directions that are different from each other by 90°. Therefore,as illustrated by a model view of FIG. 57, in the state In which thequartz glass 60 al is placed on the upper surface of the plate 83 shownin FIG. 55, magnetic fields in the positive direction of the Y-axis, inthe positive direction of the X-axis. in the negative direction of theY-axis, and in the negative direction of the X-arts are applied to thefilms which are placed in parallel to each side of the square endsurface of one N-pole and which will become the GMR elements.

In this embodiment, by using such magnetic fields, a thermal treatmentis carried out to fix the magnetization direction of the fixedmagnetization layer P (the pinned layer of the fixed magnetization layerP). Namely, in the state shown in FIG. 55, the plate 83 and the quartzglass 60 al are fixed to each other by a clamp CL, heated to 250° C. to280° C. in vacuum, and left to stand in this state for about four hours.

Thereafter, the quartz glass 60 al is taken out; the pads 65 to 68, 75to 78 shown in FIG. 42 are formed; a wiring connecting these is formed;and finally the quartz glass 60 al is cut along the broken lines shownin FIG. 50. The above process completes the production of the magneticsensor 60 shown in FIG. 42.

Next, the result of measurement of geomagnetism using the aforesaidmagnetic sensor 60 will be described. In this measurement, the azimuth θ(measurement angle) is defined as 0° when the positive direction of theY-axis of the magnetic sensor 60 is directed to the south, asillustrated in FIG. 58. The measurement results are shown in FIG. 59. Aswill be clear from FIG. 59, the X-axis magnetic sensor output Sx shownby a solid line changes like a sine curve, and the Y-axis magneticsensor output Sy shown by a broken line changes like a cosine curve.This result is exactly as expected from the characteristics shown inFIGS. 48 and 49.

In this case. the azimuth can be determined by (1) θ=arctan(Sx/Sy) whenthe X-axis magnetic sensor output Sx and the Y-axis magnetic sensoroutput Sy both assume positive values; (2) θ=180°+arctan(Sx/Sy) when theY-axis magnetic sensor output Sy assumes a negative value; and (3)θ=360°+arctan(Sx/Sy) when the X-axis magnetic sensor output Sx assumes anegative value and the Y-axis magnetic sensor output Sy assumes apositive value. Therefore, the magnetic sensor 60 can be used, forexample, as a geomagnetism (azimuth) sensor that can be mounted ontoportable type electronic devices such as a portable telephone. Here, ifthe representation in the range from −90° to 0° is permitted when theazimuth is within the range from 270° to 360°, the azimuth may bedetermined by θ=arctan(Sx/Sy) when the output Sy is positive, and byθ=180°+arctan(Sx/Sy) when the output Sy is negative.

As described above, according to the third embodiment, a magnet array isprepared which is constructed in such a manner that a plurality ofpermanent magnets are disposed at lattice points of a square lattice andthe polarity of the magnetic pole of each permanent magnet is differentfrom the polarity of the magnetic pole of the other permanent magnetsadjacent thereto and spaced apart therefrom by the shortest distance,and the magnetization direction of the magnetic layer that will becomethe aforesaid pinned layer is pinned with the use of the magnetic fieldsformed by the magnet array. Therefore, on a single chip, one can easilyform GMR elements in which the pinned magnetization directions of thepinned layers are different from each other (perpendicular to eachother). Further, by this method, one can produce single chips eachhaving GMR elements in which the pinned magnetization directions of thepinned layers are different from each other, at a time and in a largeamount, thereby leading to reduction in the cost of producing the singlechips.

Here, the present invention is by no means limited to the aforesaidembodiments, and various modifications may be made within the scope ofthe present invention. For example, though NiCo having a large residualmagnetization is adopted as a plating film in the aforesaid first andsecond embodiments, other materials (for example, Co) having a largeresidual magnetization may be adopted in place of NiCo. Further, themethod of firing the magnetization direction of the fixed magnetizationlayer in the first and second embodiments can be applied to othermagnetoresistance effect elements having pinned layers (layers having afixed magnetization axis) such as in the third embodiment. Furthermore,though PtMn is used as a pinning layer of the fixed magnetization layerP in the aforesaid three embodiments, FeMn, IrMn, or the like may beused in place of this PtMn.

1. A method of producing a magnetic sensor comprising amagnetoresistance effect element that contains a pinned layer and a freelayer, said magnetoresistance effect element having a resistance valuethat changes in accordance with a relative angle formed by amagnetization direction of the pinned layer and a magnetizationdirection of the free layer, said method comprising the steps of:forming a layer containing a magnetic layer that will become said pinnedlayer in a predetermined configuration on a substrate; formingmagnetic-field-applying magnetic layers for applying a magnetic field tothe layer containing the magnetic layer that will become said pinnedlayer; magnetizing said magnetic-field-applying magnetic layers; andpinning the magnetization direction of the magnetic layer that willbecome said pinned layer with a magnetic field produced by a residualmagnetization of said magnetic-field-applying magnetic layers.
 2. Themethod of producing a magnetic sensor according to claim 1, wherein thestep of forming said magnetic-field-applying magnetic layers is a stepof forming said magnetic-field-applying magnetic layers so as tosandwich the layer containing the magnetic layer that will become saidpinned layer in plan view.
 3. The method of producing a magnetic sensoraccording to claim 2, wherein the magnetization direction of saidmagnetic-field-applying magnetic layers is different from a direction ofthe magnetic field produced by said residual magnetization.
 4. A methodof producing a magnetic sensor comprising a magnetoresistance effectelement that contains a pinned layer and a free layer, saidmagnetoresistance effect element having a resistance value that changesin accordance with a relative angle formed by a magnetization directionof the pinned layer and a magnetization direction of the free layer,said method comprising the steps of: preparing a magnet arrayconstructed in such a manner that a plurality of permanent magnets arcarranged at lattice points of a square lattice, where a polarity of amagnetic pole of each permanent magnet is different from a polarity ofother magnetic poles that are adjacent thereto and spaced aparttherefrom by the shortest distance; disposing a wafer in which a layercontaining a magnetic layer that will at least become said pinned layerhas been formed, above said magnet array; and pinning the magnetizationdirection of the magnetic layer that will become said pinned layer byusing a magnetic field formed between one of said magnetic poles andanother of said magnetic poles that is adjacent thereto and spaced aparttherefrom by the shortest distance.